<?php
checkProfile();
global $temple_settings;
global $cardInfoCache;
$Temple_Setting = array();
if (! isLogined()) {
    header("Location: index.php?mod=login&tip=1");
    die();
}

$mod = get_get("mod");
if ($mod == "") {
    header("Location: index.php?mod=home&childmod=zone");
    die();
}
global $_G;
$_G["page"]["mod"] = $mod;
global $hm_uid;
$hm_uid = get_get("uid");
if (! $hm_uid)
    $hm_uid = getSessionUid();

function print_hm_uid()
{
    global $hm_uid;
    echo $hm_uid;
}
if (! isAjaxRequest()) {
    global $_G;
    global $_GCONFIG;
    $isnew = isNew();
    $name = $isnew ? $_GCONFIG["user"]["default"]["name"] : $_G["profile"]["name"];
    $headimage = getHeadImageURL();
    setSetting("farme", array(
        "isnew" => $isnew,
        "name" => $name,
        "head_image_path" => $headimage
    ));
    loadTemp("module_farme.temp.php");
} else {
    setRequest();
}
die();
?>